<template>
  <div class="form-repeat-setting">
    <el-checkbox :value="field.setting.isRepeat" @input="update" :true-label="1" :false-label="0">
      {{$t('common.base.repeateIsNotAllow')}}
      <el-tooltip :content="$t('common.form.tip.repeateValidateTips')" placement="top">
        <i class="iconfont icon-question"></i>
      </el-tooltip>
    </el-checkbox>
  </div>
</template>

<script>
/* props */
import { settingProps } from '@src/component/form/components/props';

export default {
  name: 'form-repeat-setting',
  props: {
    ...settingProps
  },
  methods: {
    update(value) {
      this.$emit('input', value, 'isRepeat', true);
    }
  }
}
</script>